<div class="ui-g-12 p-20 ui-g-nopad systemStaff">
    <p-panel headerClass="bg-none" [showScroll]="true" [marginHeight]="80">
      <p-header>
        <div class="text-right p-6-0 h-48">
          <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">{{title}}</span>
          <button pButton type="button" (click)="save('2')" label="提交" class="btn btn-success"  ></button>
          <button pButton type="button" (click)="save('1')" label="保存" class="btn btn-primary m-l-8"></button>
          <button pButton type="button" (deClick)="returnBtn()" label="取消" class="btn btn-secondary m-l-8"></button>
        </div>
      </p-header>

      <form #form="ngForm" novalidate class="form-horizontal" role="form">
        
        
        <div class="table-row">
          <div class="table-cell text-right p-l-25 p-required">名称：</div>
          <div class="table-cell " style="min-width: 410px;">
            <input  type="text" name="name" class="p-input" placeholder="请输入..." size="30" maxlength="50" pInputText [(ngModel)]="objToPost.name">
          </div>
        </div>

        <div class="table-row">
          <div class="table-cell text-right p-l-25 p-required">网站：</div>
          <div class="table-cell ">
            <p-dropdown optionLabel="name" [justValue]="true" dataKey="code" required name="siteCode" styleClass="width-full" [options]="siteArr"
              [(ngModel)]="objToPost.siteCode" [style]="{width: '100%'}" ></p-dropdown>
          </div>
        </div>

        <div class="table-row">
          <div class="table-cell text-right p-l-25 p-required">目录：</div>
          <div class="table-cell ">
            <!-- <input type="text" name="catalogCode" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.catalogCode"> -->
            <!-- <p-treeselect [value]="treeNode" selectionMode="single" dataKey="code" [(selection)]="selectedFiles2"  name="parentCode" ngDefaultControl></p-treeselect> -->
            <p-treeselect [value]="tree" [filter]="false" placeholder="{{objToPost.catalogName || '请选择'}}" [dataKey]="'code'" selectionMode="single" [(selection)]="selectedFiles"></p-treeselect>
          </div>
        </div>
  
        <!-- <div class="table-row">
          <div class="table-cell text-right p-l-25">模板：</div>
          <div class="table-cell ">
            <input type="text" name="templateCode" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.templateCode">
          </div>
        </div>  -->

        <div class="table-row">
          <div class="table-cell text-right p-l-25 p-required">模板：</div>
          <div class="table-cell ">
            <p-dropdown optionLabel="name" [justValue]="true" dataKey="code" required name="templateCode" styleClass="width-full" [options]="templateArr"
              [(ngModel)]="objToPost.templateCode" [style]="{width: '100%'}" ></p-dropdown>
          </div>
        </div>

        <div class="table-row">
          <div class="table-cell text-right p-l-25">作者：</div>
          <div class="table-cell ">
            <input type="text" name="author" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.author">
          </div>
        </div> 

        <div class="table-row">
          <div class="table-cell text-right p-l-25">关键词：</div>
          <div class="table-cell ">
            <input type="text" name="keywords" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.keywords">
          </div>
        </div> 

        <div class="table-row">
          <div class="table-cell text-right p-l-25">描述：</div>
          <div class="table-cell ">
          <!-- <div class="table-cell icon-text" data-text="天">  单位-->
            <input type="text" name="description" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.description">
          </div>
        </div> 

        <div class="table-row">
          <div class="table-cell text-right p-l-25">序号：</div>
          <div class="table-cell ">
            <!-- <input type="text" name="sortNum" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.sortNum"> -->
            <p-spinner name="sort" size="30" maxlength="6" styleClass="p-spinner" [(ngModel)]="objToPost.sortNum" placeholder="请输入..."
              [step]="1" [min]="1" [max]="20" ></p-spinner>
          </div>
        </div> 

        <!-- <div class="table-row">
          <div class="table-cell text-right p-l-25 v-top p-required">内容：</div>
          <div class="table-cell relative">
              <textarea rows="5" cols="35" name='content' [(ngModel)]="objToPost.content" class="width-full" pInputTextarea
                  [ngClass]="" ></textarea>
              <div class="text-right opacity06">还可输入{{255 - (objToPost.content?.length || 0)}}个字</div>
          </div>
        </div> -->

        <div class="table-row" >
            <div class="table-cell text-right p-l-25"  style="vertical-align:top">
                图片：
            </div>
            <div class="table-cell text-left relative" >
                <div class="pull-left m-l-10" *ngIf="imageArr&&imageArr.length>0">
                    <p-lightboxfile (removeItem)="removeItem($event,'image');" styleClass="inline-block" [images]="imageArr" [showDelete]="true"></p-lightboxfile>
                </div>
                <div class="ui-g-3 file-item-img " >
                    <div class="upload">
                        <div class="icon-plus"></div>
                        <div class="text">上传图片</div>
                    </div>
                    <!-- 图片验证 -->
                    <!-- accept="image/gif,image/png" onlyImg="true" auto="true" maxFileSize="2465792" --> 
                    <p-fileUpload  styleClass="height-full width-full absolute opacity0" [controlAuto]="true"  [url]="uploadRrl"
                        accept="image/png,image/bmp,image/jpeg,image/jpg" [onlyImg]="onlyImg" auto="true" maxFileSize="2465792"
                        cancelLabel="image"  #image (onSelect)="onSelect($event,image)"  (onUpload)="onUpload($event,image);">
                        <ng-template pTemplate="file">
                        </ng-template>
                    </p-fileUpload>
                </div>
            </div>
        </div>
        
        <div class="table-row">
          <div class="table-cell text-right p-l-25 v-top p-required">内容：</div>
          <div class="table-cell"  style="min-height: 500px;" id = "infoTr">
            <iframe name="myiframe" id="myrame" src="/assets/wang_editor/index.html?t=1" frameborder="0" align="left" width="240%" height="100%" scrolling="auto">
              <p>你的浏览器不支持iframe标签</p>
            </iframe>
          </div>
        </div>

        <!-- 
        <div class="table-row">
          <div class="table-cell text-right p-l-25">：</div>
          <div class="table-cell ">
            <input type="text" name="" placeholder="请输入..." class="p-input" size="30" maxlength="10" pInputText [(ngModel)]="objToPost.">
          </div>
        </div> 
        -->

      </form>
      
    </p-panel>
</div>